package core.client;

class ClientReceive<T> extends Thread{
	private CoreClient<T> coreClient;
	public ClientReceive(CoreClient<T> coreClient) {
		this.coreClient = coreClient;
	}
	@Override
	public void run() {
		while (coreClient.isLoop()) {
			coreClient.setStartTime(System.currentTimeMillis());
			T t = coreClient.decode();
			if (t == null) {
				continue;
			}
			coreClient.onReceive(t);
		}
	}
}
